/*   time:2019-06-13 20:39:24*/
function t(t, e, a) {
    return e in t ? Object.defineProperty(t, e, {
        value: a,
        enumerable: !0,
        configurable: !0,
        writable: !0
    }) : t[e] = a, t
}
var e, a, o = getApp(),
    s = o.requirejs("core"),
    i = (o.requirejs("icons"), o.requirejs("foxui")),
    n = o.requirejs("biz/diypage"),
    r = o.requirejs("biz/diyform"),
    c = o.requirejs("biz/goodspicker"),
    d = o.requirejs("jquery"),
    l = o.requirejs("wxParse/wxParse"),
    u = 0,
    g = o.requirejs("biz/selectdate");
Page((t(a = {
    data: (e = {
        diypages: {},
        usediypage: !1,
        specs: [],
        options: [],
        icons: o.requirejs("icons"),
        goods: {},
        indicatorDots: !0,
        autoplay: !0,
        interval: 5e3,
        duration: 500,
        circular: !0,
        play: "http://qcoe22giq.bkt.clouddn.com/static/images/video_play.png",
        mute: "http://qcoe22giq.bkt.clouddn.com/static/images/icon/mute.png",
        voice: "http://qcoe22giq.bkt.clouddn.com/static/images/icon/voice.png",
        active: "",
        slider: "",
        tempname: "",
        info: "active",
        preselltimeend: "",
        presellsendstatrttime: "",
        advWidth: 0,
        dispatchpriceObj: 0,
        now: parseInt(Date.now() / 1e3),
        day: 0,
        hour: 0,
        minute: 0,
        second: 0,
        timer: 0,
        discountTitle: "",
        istime: 1,
        istimeTitle: "",
        isSelected: !1,
        params: {},
        total: 1,
        optionid: 0,
        audios: {},
        audiosObj: {},
        defaults: {
            id: 0,
            merchid: 0
        },
        buyType: "",
        pickerOption: {},
        specsData: [],
        specsTitle: "",
        canBuy: "",
        diyform: {},
        showPicker: !1,
        showcoupon: !1,
        pvalOld: [0, 0, 0],
        pval: [0, 0, 0],
        areas: [],
        noArea: !0,
        commentObj: {},
        commentObjTab: 1,
        loading: !1,
        commentEmpty: !1,
        commentPage: 1,
        commentTotal: 1,
        commentLevel: "all",
        commentList: [],
        closeBtn: !1,
        soundpic: !0,
        animationData: {},
        uid: "",
        stararr: ["all", "good", "normal", "bad", "pic"],
        nav_mask: !1,
        nav_mask2: !1,
        nav: 0,
        giftid: "",
        limits: !0,
        modelShow: !1,
        showgoods: !0
    }, t(e, "timer", 0), t(e, "lasttime", 0), t(e, "hour", "-"), t(e, "min", "-"), t(e, "sec", "-"), t(e, "currentDate", ""), t(e, "dayList", ""), t(e, "currentDayList", ""), t(e, "currentObj", ""), t(e, "currentDay", ""), t(e, "checkedDate", ""), t(e, "showDate", ""), t(e, "scope", ""), t(e, "goods_hint_show", !1), t(e, "presellisstart", 0), t(e, "advHeight", 1), t(e, "show_goods", !0), t(e, "goodscircle", {
        can_share_goodscircle: !1
    }), e),
    imageLoad: function(t) {
        var e = t.detail.height,
            a = t.detail.width,
            o = Math.floor(750 * e / a);
        e == a ? this.setData({
            advHeight: 750
        }) : this.setData({
            advHeight: o
        })
    },
    favorite: function(t) {
        o.checkAuth();
        var e = this;
        if (e.data.limits) {
            var a = t.currentTarget.dataset.isfavorite ? 0 : 1;
            s.get("member/favorite/toggle", {
                id: e.data.options.id,
                isfavorite: a
            }, function(t) {
                t.isfavorite ? e.setData({
                    "goods.isfavorite": 1
                }) : e.setData({
                    "goods.isfavorite": 0
                })
            })
        }
    },
    goodsTab: function(t) {
        var e = this,
            a = t.currentTarget.dataset.tap;
        if ("info" == a) this.setData({
            info: "active",
            para: "",
            comment: ""
        });
        else if ("para" == a) this.setData({
            info: "",
            para: "active",
            comment: ""
        });
        else if ("comment" == a) {
            if (e.setData({
                info: "",
                para: "",
                comment: "active"
            }), 0 < e.data.commentList.length) return void e.setData({
                loading: !1
            });
            e.setData({
                loading: !0
            }), s.get("goods/get_comment_list", {
                id: e.data.options.id,
                level: e.data.commentLevel,
                page: e.data.commentPage
            }, function(t) {
                0 < t.list.length ? e.setData({
                    loading: !1,
                    commentList: t.list,
                    commentTotal: t.total,
                    commentPage: t.page
                }) : e.setData({
                    loading: !1,
                    commentEmpty: !0
                })
            })
        }
    },
    onReachBottom: function() {
        var e = this;
        if (e.data.commentTotal <= 10) return !1;
        var t = e.data.commentObjTab,
            a = "";
        1 == t ? a = "all" : 2 == t ? a = "good" : 3 == t ? a = "normal" : 4 == t ? a = "bad" : 5 == t && (a = "pic"), e.setData({
            loading: !0
        }), s.get("goods/get_comment_list", {
            id: e.data.options.id,
            level: a,
            page: e.data.commentPage
        }, function(t) {
            0 == t.error && (e.setData({
                loading: !1
            }), 0 < t.list.length && e.setData({
                commentPage: e.data.commentPage + 1,
                commentTotal: t.total,
                commentList: e.data.commentList.concat(t.list)
            }))
        })
    },
    comentTap: function(t) {
        var e = this,
            a = t.currentTarget.dataset.type,
            o = "";
        1 == a ? (o = "all", e.data.commentPage = 1) : 2 == a ? (e.data.commentPage = 1, o = "good") : 3 == a ? (e.data.commentPage = 1, o = "normal") : 4 == a ? (e.data.commentPage = 1, o = "bad") : 5 == a && (e.data.commentPage = 1, o = "pic"), a != e.data.commentObjTab && s.get("goods/get_comment_list", {
            id: e.data.options.id,
            level: o,
            page: e.data.commentPage
        }, function(t) {
            0 < t.list.length && e.setData({
                loading: !1,
                commentList: t.list,
                commentTotal: t.total,
                commentPage: t.page,
                commentObjTab: a,
                commentEmpty: !1
            })
        })
    },
    preview: function(t) {
        wx.previewImage({
            current: t.currentTarget.dataset.src,
            urls: t.currentTarget.dataset.urls
        })
    },
    getDetail: function(t) {
        var g = this,
            m = parseInt(Date.now() / 1e3);
        g.setData({
            loading: !0
        }), s.get("goods/get_detail", {
            id: t.id
        }, function(e) {
            if (0 != e.error) return g.setData({
                show: !0,
                showgoods: !1
            }), i.toast(g, e.message), void setTimeout(function() {
                wx.navigateBack()
            }, 1500);
            ["marketprice", "productprice"].forEach(function(t) {
                void 0 !== e.goods[t] && (e.goods[t] = parseFloat(e.goods[t]))
            });
            var t = e.goods.coupons,
                a = (e.goods.thumbMaxHeight, e.goods.thumbMaxWidth, e.goods.goodscircle);
            if (g.setData({
                coupon: t,
                coupon_l: t.length,
                packagegoods: e.goods.packagegoods,
                packagegoodsid: e.goods.packagegoods.goodsid || 0,
                credittext: e.goods.credittext,
                activity: e.goods.activity,
                bottomFixedImageUrls: e.goods.bottomFixedImageUrls,
                phonenumber: e.goods.phonenumber || "",
                showDate: e.goods.showDate || "",
                scope: e.goods.scope || "",
                show_goods: e.goods.show_goods,
                goodscircle: a
            }), e.goods.packagegoods && g.package(), l.wxParse("wxParseData", "html", e.goods.content, g, "0"), l.wxParse("wxParseData_buycontent", "html", e.goods.buycontent, g, "0"), g.setData({
                show: !0,
                goods: e.goods,
                minprice: e.goods.minprice,
                maxprice: e.goods.maxprice,
               
                preselltimeend: e.goods.preselltimeend,
                style: e.goods.labelstyle.style || "",
                navbar: e.goods.navbar,
                labels: e.goods.labels
            }), e.goods.gifts && 1 == e.goods.gifts.length && g.setData({
                giftid: e.goods.gifts[0].id
            }), wx.setNavigationBarTitle({
                title: e.goods.title || "商品详情"
            }), u = e.goods.hasoption, d.isEmptyObject(e.goods.dispatchprice) || "string" == typeof e.goods.dispatchprice ? g.setData({
                dispatchpriceObj: 0
            }) : g.setData({
                dispatchpriceObj: 1
            }), 0 < e.goods.isdiscount && e.goods.isdiscount_time >= m ? (clearInterval(g.data.timer), o = setInterval(function() {
                g.countDown(0, e.goods.isdiscount_time)
            }, 1e3), g.setData({
                timer: o
            })) : g.setData({
                discountTitle: "活动已结束"
            }), 0 < e.goods.istime && (clearInterval(g.data.timer), o = setInterval(function() {
                g.countDown(e.goods.timestart, e.goods.timeend, "istime")
            }, 1e3), g.setData({
                timer: o
            })), 0 < e.goods.ispresell) {
                var o = setInterval(function() {
                    0 == e.goods.canbuy ? g.countDown(m, e.goods.preselltimestart, "istime") : 1 == e.goods.canbuy && g.countDown(m, e.goods.preselltimeend, "istime")
                }, 1e3);
                g.setData({
                    timer: o,
                    presellisstart: e.goods.presellisstart
                }), g.setData({
                    preselltimeend: e.goods.preselltimeend || e.goods.preselltimeend.getMonth() + "月" + e.goods.preselltimeend || e.goods.preselltimeend.getDate() + "日 " + e.goods.preselltimeend || e.goods.preselltimeend.getHours() + ":" + e.goods.preselltimeend || e.goods.preselltimeend.getMinutes() + ":" + e.goods.preselltimeend || e.goods.preselltimeend.getSeconds(),
                    presellsendstatrttime: e.goods.presellsendstatrttime || e.goods.presellsendstatrttime.getMonth() + "月" + e.goods.presellsendstatrttime || e.goods.presellsendstatrttime.getDate() + "日"
                })
            }
            0 < e.goods.getComments && s.get("goods/get_comments", {
                id: g.data.options.id
            }, function(t) {
                g.setData({
                    commentObj: t
                })
            }), e.goods.fullbackgoods && g.setData({
                fullbackgoods: e.goods.fullbackgoods
            });
            var n = g.data.fullbackgoods;
            if (null != n) {
                var r = n.maxfullbackratio,
                    c = n.maxallfullbackallratio;
                r = Math.round(r), c = Math.round(c);
                g.setData({
                    maxfullbackratio: r,
                    maxallfullbackallratio: c
                })
            }
            9 == e.goods.type && (g.setData({
                checkedDate: e.goods.nowDate
            }), g.show_cycelbuydate()), e.goods.seckillinfo && g.initSeckill(e.goods)
        })
    },
    initSeckill: function(a) {
        var s = this,
            i = parseInt(a.seckillinfo.status),
            n = a.seckillinfo.starttime,
            r = a.seckillinfo.endtime;
        if (-1 != i) {
            var c = 0,
                d = 0,
                t = o.globalData.approot;
            wx.request({
                url: t + "map.json",
                success: function(t) {
                    var e = new Date(t.header.Date) / 1e3;
                    c = 0 == i ? r - e : n - e, s.setData({
                        lasttime: c
                    }), clearInterval(s.data.timer), s.setTimer(a.seckillinfo), d = s.setTimerInterval(a.seckillinfo), s.setData({
                        timer: d
                    })
                }
            })
        }
    },
    setTimer: function(t) {
        var a = this,
            s = 0;
        if (-1 != t.status && parseInt(a.data.lasttime) % 10 == 0) {
            var i = parseInt(t.status),
                n = t.starttime,
                r = t.endtime;
            if (-1 != i) {
                var e = o.globalData.approot;
                wx.request({
                    url: e + "map.json",
                    success: function(t) {
                        var e = new Date(t.header.Date) / 1e3;
                        s = 0 == i ? r - e : n - e, a.setData({
                            lasttime: s
                        })
                    }
                })
            }
        }
        s = parseInt(a.data.lasttime) - 1;
        var c = a.formatSeconds(s);
        a.setData({
            lasttime: s,
            hour: c.hour,
            min: c.min,
            sec: c.sec
        }), s <= 0 && a.onLoad()
    },
    setTimerInterval: function(t) {
        var e = this;
        return setInterval(function() {
            e.setTimer(t)
        }, 1e3)
    },
    formatSeconds: function(t) {
        var e = parseInt(t),
            a = 0,
            o = 0;
        return 60 < e && (a = parseInt(e / 60), e = parseInt(e % 60), 60 < a && (o = parseInt(a / 60), a = parseInt(a % 60))), {
            hour: o < 10 ? "0" + o : o,
            min: a < 10 ? "0" + a : a,
            sec: e < 10 ? "0" + e : e
        }
    },
    countDown: function(t, e, a) {
        var o = parseInt(Date.now() / 1e3),
            s = parseInt((o < t ? t : e) - o),
            i = Math.floor(s / 86400),
            n = Math.floor((s - 24 * i * 60 * 60) / 3600),
            r = Math.floor((s - 24 * i * 60 * 60 - 3600 * n) / 60),
            c = [i, n, r, Math.floor(s - 24 * i * 60 * 60 - 3600 * n - 60 * r)];
        this.setData({
            time: c
        });
        var d = "";
        o < t ? d = "距离限时购开始" : t <= o && o < e ? d = "距离限时购结束" : (d = "活动已经结束，下次早点来~", this.setData({
            istime: 0
        })), this.setData({
            istimeTitle: d
        })
    },
    cityPicker: function(t) {
        t.currentTarget.dataset.tap, wx.navigateTo({
            url: "/pages/goods/region/index?id=" + this.data.goods.id + "&region=" + this.data.goods.citys.citys + "&onlysent=" + this.data.goods.citys.onlysent
        })
    },
    giftPicker: function() {
        this.setData({
            active: "active",
            gift: !0
        })
    },
    couponPicker: function() {
        this.setData({
            active: "active",
            showcoupon: !0
        })
    },
    couponrecived: function(t) {
        var e = t.currentTarget.dataset.id,
            a = this;
        s.post("goods.pay_coupon", {
            id: e
        }, function(t) {
            0 == t.error ? (a.setData({
                showcoupon: !1,
                active: ""
            }), i.toast(a, "已领取")) : i.toast(a, t.message)
        })
    },
    selectPicker: function(t) {
        o.checkAuth();
        var e = this,
            a = t.currentTarget.dataset.time,
            s = t.currentTarget.dataset.timeout;
        if (e.data.limits) {
            if ("timeout" == a || "access_time" == a) {
                if ("false" == s) return void e.setData({
                    goods_hint_show: !0
                });
                if ("true" == s) {
                    if ("access_time" == a) return e.setData({
                        goods_hint_show: !1
                    }), i = "goodsdetail", void c.selectpicker(t, e, i);
                    if ("timeout" == a) return void e.setData({
                        goods_hint_show: !1
                    })
                }
            }
            var i = "goodsdetail";
            c.selectpicker(t, e, i)
        }
    },
    specsTap: function(t) {
        c.specsTap(t, this)
    },
    emptyActive: function() {
        this.setData({
            active: "",
            slider: "out",
            tempname: "",
            showcoupon: !1,
            gift: !1,
            cycledate: !1
        })
    },
    buyNow: function(t) {
        c.buyNow(t, this, "goods_detail")
    },
    getCart: function(t) {
        c.getCart(t, this)
    },
    select: function() {
        var t = this.data.optionid;
        this.data.diyform, 0 < u && 0 == t ? i.toast(this, "请选择规格") : this.setData({
            active: "",
            slider: "out",
            isSelected: !0,
            tempname: ""
        })
    },
    inputNumber: function(t) {
        c.inputNumber(t, this)
    },
    number: function(t) {
        c.number(t, this)
    },
    onLoad: function(t) {
        var i = this;
        i.setData({
            imgUrl: o.globalData.approot
        }), s.get("black", {}, function(t) {
            t.isblack && wx.showModal({
                title: "无法访问",
                content: "您在商城的黑名单中，无权访问！",
                success: function(t) {
                    t.confirm && this.close(), t.cancel && this.close()
                }
            })
        }), n.get(this, "goodsdetail", function(t) {
            var e = t.diypage.items;
            for (var a in e) "copyright" == e[a].id && i.setData({
                copyright: e[a]
            })
        }), t = t || {};
        var e = decodeURIComponent(t.scene);
        if (!t.id && e) {
            var a = s.str2Obj(e);
            t.id = a.id, a.mid && (t.mid = a.mid)
        }
        this.setData({
            id: t.id
        }), o.url(t), wx.getSystemInfo({
            success: function(t) {
                i.setData({
                    windowWidth: t.windowWidth,
                    windowHeight: t.windowHeight
                })
            }
        }), i.getDetail(t), i.setData({
            uid: t.id,
            options: t,
            success: !0,
            cover: !0,
            showvideo: !0
        }), wx.getSystemInfo({
            success: function(t) {
                i.setData({
                    advWidth: t.windowWidth
                })
            }
        }), setTimeout(function() {
            i.setData({
                areas: o.getCache("cacheset").areas
            })
        }, 3e3)
    },
    show_cycelbuydate: function() {
        var t = g.getCurrentDayString(this, this.data.showDate);
        this.setData({
            currentObj: t,
            currentDate: t.getFullYear() + "年" + (t.getMonth() + 1) + "月" + t.getDate() + "日 " + ["周日", "周一", "周二", "周三", "周四", "周五", "周六"][t.getDay()],
            currentYear: t.getFullYear(),
            currentMonth: t.getMonth() + 1,
            currentDay: t.getDate(),
            initDate: Date.parse(t.getFullYear() + "/" + (t.getMonth() + 1) + "/" + t.getDate()),
            checkedDate: Date.parse(t.getFullYear() + "/" + (t.getMonth() + 1) + "/" + t.getDate()),
            maxday: this.data.scope
        })
    },
    package: function() {
        var e = this;
        s.get("package.get_list", {
            goodsid: this.data.packagegoodsid
        }, function(t) {
            e.setData({
                packageList: t.list[0]
            })
        })
    },
    onShow: function() {
        var a = this;
        o.getCache("isIpx") ? a.setData({
            isIpx: !0,
            iphonexnavbar: "fui-iphonex-navbar"
        }) : a.setData({
            isIpx: !1,
            iphonexnavbar: ""
        }), wx.getStorage({
            key: "mydata",
            success: function(t) {
                wx.removeStorage({
                    key: "mydata",
                    success: function(t) {}
                }), a.getDetail(t.data), wx.pageScrollTo({
                    scrollTop: 0
                })
            }
        }), wx.getSetting({
            success: function(t) {
                var e = t.authSetting["scope.userInfo"];
                a.setData({
                    limits: e
                })
            }
        })
    },
    onChange: function(t) {
        return r.onChange(this, t)
    },
    DiyFormHandler: function(t) {
        return r.DiyFormHandler(this, t)
    },
    selectArea: function(t) {
        return r.selectArea(this, t)
    },
    bindChange: function(t) {
        return r.bindChange(this, t)
    },
    onCancel: function(t) {
        return r.onCancel(this, t)
    },
    onConfirm: function(t) {
        return r.onConfirm(this, t)
    },
    getIndex: function(t, e) {
        return r.getIndex(t, e)
    },
    onShareAppMessage: function() {
        return this.setData({
            closeBtn: !1
        }), s.onShareAppMessage("/pages/goods/detail/index?id=" + this.data.options.id, this.data.goods.title)
    },
    showpic: function() {
        this.setData({
            showpic: !0,
            cover: !1,
            showvideo: !1
        }), this.videoContext = wx.createVideoContext("myVideo"), this.videoContext.pause()
    },
    showvideo: function() {
        this.setData({
            showpic: !1,
            showvideo: !0
        }), this.videoContext = wx.createVideoContext("myVideo"), this.videoContext.play()
    },
    startplay: function() {
        this.setData({
            cover: !1
        }), this.videoContext = wx.createVideoContext("myVideo"), this.videoContext.play()
    },
    bindfullscreenchange: function(t) {
        1 == t.detail.fullScreen ? this.setData({
            success: !1
        }) : this.setData({
            success: !0
        })
    },
    phone: function() {
        var t = this.data.phonenumber + "";
        wx.makePhoneCall({
            phoneNumber: t
        })
    },
    sharePoster: function() {
        wx.navigateTo({
            url: "/pages/goods/poster/poster?id=" + this.data.uid
        })
    },
    closeBtn: function() {
        this.setData({
            closeBtn: !1
        })
    },
    onHide: function() {
        this.setData({
            closeBtn: !1
        })
    },
    showshade: function() {
        o.checkAuth(), this.setData({
            closeBtn: !0
        })
    },
    nav: function() {
        this.setData({
            nav_mask: !this.data.nav_mask
        })
    },
    nav2: function() {
        this.setData({
            nav_mask2: !this.data.nav_mask2
        })
    },
    changevoice: function() {
        this.data.sound ? this.setData({
            sound: !1,
            soundpic: !0
        }) : this.setData({
            sound: !0,
            soundpic: !1
        })
    },
    radioChange: function(t) {
        this.setData({
            giftid: t.currentTarget.dataset.giftgoodsid,
            gift_title: t.currentTarget.dataset.title
        })
    },
    activityPicker: function() {
        this.setData({
            fadein: "in"
        })
    },
    actOutPicker: function() {
        this.setData({
            fadein: ""
        })
    },
    hintclick: function() {
        wx.openSetting({
            success: function(t) {}
        })
    },
    cancelclick: function() {
        this.setData({
            modelShow: !1
        })
    },
    confirmclick: function() {
        this.setData({
            modelShow: !1
        }), wx.openSetting({
            success: function(t) {}
        })
    },
    sendclick: function() {
        wx.navigateTo({
            url: "/pages/map/index"
        })
    },
    syclecancle: function() {
        this.setData({
            cycledate: !1
        })
    },
    sycleconfirm: function() {
        this.setData({
            cycledate: !1
        })
    },
    editdate: function(t) {
        g.setSchedule(this), this.setData({
            cycledate: !0
        })
    },
    doDay: function(t) {
        g.doDay(t, this)
    },
    selectDay: function(t) {
        g.selectDay(t, this), g.setSchedule(this)
    },
    play: function(t) {
        var r = t.target.dataset.id,
            c = this.data.audiosObj[r] || !1;
        if (!c) {
            c = wx.createInnerAudioContext("audio_" + r);
            var e = this.data.audiosObj;
            e[r] = c, this.setData({
                audiosObj: e
            })
        }
        var d = this;
        c.onPlay(function() {
            var n = setInterval(function() {
                var t = c.currentTime / c.duration * 100 + "%",
                    e = Math.floor(Math.ceil(c.currentTime) / 60),
                    a = (Math.ceil(c.currentTime) % 60 / 100).toFixed(2).slice(-2),
                    o = Math.ceil(c.currentTime);
                e < 10 && (e = "0" + e);
                var s = e + ":" + a,
                    i = d.data.audios;
                i[r].audiowidth = t, i[r].Time = n, i[r].audiotime = s, i[r].seconds = o, d.setData({
                    audios: i
                })
            }, 1e3)
        });
        var a = t.currentTarget.dataset.audio,
            o = t.currentTarget.dataset.time,
            s = t.currentTarget.dataset.pausestop,
            i = t.currentTarget.dataset.loopplay;
        0 == i && c.onEnded(function(t) {
            n[r].status = !1, d.setData({
                audios: n
            })
        });
        var n = d.data.audios;
        n[r] || (n[r] = {}), c.paused && 0 == o ? (c.src = a, c.play(), 1 == i && (c.loop = !0), n[r].status = !0, d.pauseOther(r)) : c.paused && 0 < o ? (c.play(), 0 == s ? c.seek(o) : c.seek(0), n[r].status = !0, d.pauseOther(r)) : (c.pause(), n[r].status = !1), d.setData({
            audios: n
        })
    },
    pauseOther: function(o) {
        var s = this;
        d.each(this.data.audiosObj, function(t, e) {
            if (t != o) {
                e.pause();
                var a = s.data.audios;
                a[t] && (a[t].status = !1, s.setData({
                    audios: a
                }))
            }
        })
    }
}, "onHide", function() {
    this.pauseOther()
}), t(a, "onUnload", function() {
    this.pauseOther()
}), t(a, "navigate", function(t) {
    var e = t.currentTarget.dataset.url,
        a = t.currentTarget.dataset.phone,
        o = t.currentTarget.dataset.appid,
        s = t.currentTarget.dataset.appurl;
    e && wx.navigateTo({
        url: e,
        fail: function() {
            wx.switchTab({
                url: e
            })
        }
    }), a && wx.makePhoneCall({
        phoneNumber: a
    }), o && wx.navigateToMiniProgram({
        appId: o,
        path: s
    })
}), t(a, "close", function() {
    o.globalData.flag = !0, wx.reLaunch({
        url: "../index/index"
    })
}), a));